home *** CD-ROM | disk | FTP | other *** search
XSetup plugin | 2002-04-06 | 1.6 KB | 60 lines |
- "FILE"="Xteq Systems X-Setup Plugin 6.0"
- "TYPE"="2"
- "COUNT"="1"
- "UIPATH 1"="Network\Network Time Protocol"
- "NAME"="NTP Update Interval"
- "VERSION"="2.00"
- "OSVersion"="000001"
- "LANGUAGE"="VBScript"
- "TEXT 1"="Interval (min)"
- "DESCRIPTION 1"="Specifies update interval for the Network Time Protocol feature included in Windows."
- "DESCRIPTION 2"="The default update interval is 10080 minutes (7 days)."
- "AUTHOR"="MacGyver aka Habeeb J. Dihu"
- "CONTACTURL"="http://www.macgyver.org/"
- "COPYRIGHT"="Copyright ⌐ MacGyver aka Habeeb J. Dihu - All Rights Reserved."
- "COMMENT 1"="No time like the present. "
- "COMMENT 2"="Based on plug-in by Xteq Systems (CptSiskoX)"
- "COMMENT 3"="Internet Time Configuration -- see Microsoft KB Q297227. http://support.microsoft.com/support/kb/articles/Q297/2/27.asp"
-
-
-
- sPath="HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient\SpecialPollInterval"
-
- Sub Plugin_Initialize
- s=RegReadValue(sPath)
- if IsEmpty(s) then
- Call SetUIElement(1,"")
- else
- If IsNumeric(s)=true then
- l=CLng(s)
- l=l/60 '=minutes
- Call SetUIElement(1,l)
- end if
- end if
-
- End Sub
-
- Sub Plugin_CheckData(ElementIndex)
- End Sub
-
- Sub Plugin_Apply(ElementIndex,ElementSubIndex)
- s=GetUIElement(1)
- if len(s)=0 then
- if RegValueExists(sPath) then s="10080"
- end if
-
- if IsNumeric(s)=false then
- Call MsgError("Please use a valid numeric value!")
- else
- l=Clng(s)
- l=l*60 'seconds
-
- Call RegWriteValue(sPath,l,2)
- Call Restart()
- end if
-
- End Sub
-
- Sub Plugin_Terminate
- End Sub
-